<template>
  <div class="title-container" >
    <img :src="titleImg" alt="" @click="handleNavToPage"/>
  </div>
</template>

<script>
export default {
  name: "fistLevelHeader",
  props: {
    titleImg: {
      type: String,
      default:"",
    },
    item: {
      type: Object,
      default:()=>{}
    },
  },
  methods: {
    handleNavToPage(){
      console.log(this.item.title)
      if(this.item.title==='设备设施管理'){
        this.$router.push({
          name: this.item.path
        })
      }else{
        return
      }
    }
  },
};
</script>

<style lang="scss" scoped>
.title-container {
  width: 100%;
  height: calc( 40 / 1920 * 100vw);
  margin-bottom: calc( 40 / 1920 * 100vw);
  background-image: url("./../../../assets/data-screen/screen-border.png");
  background-size: 100% calc( 4 / 1920 * 100vw);
  background-position: center bottom;
  background-repeat: no-repeat;
  img {
    width: auto;
    height: calc( 24 / 1920 * 100vw);
    cursor: pointer;
  }

}
</style>
